/* /web/static/lib/es6-promise/es6-promise-polyfill.js defined in bundle 'web.assets_common_minimal' */ (function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory():typeof define==='function'&&define.amd?define(factory):(global.ES6Promise=factory());}(this,(function(){'use strict';function objectOrFunction(x){var type=typeof x;return x!==null&&(type==='object'||type==='function');} function isFunction(x){return typeof x==='function';} var _isArray=void 0;if(Array.isArray){_isArray=Array.isArray;}else{_isArray=function(x){return Object.prototype.toString.call(x)==='[object Array]';};} var isArray=_isArray;var len=0;var vertxNext=void 0;var customSchedulerFn=void 0;var asap=function asap(callback,arg){queue[len]=callback;queue[len+1]=arg;len+=2;if(len===2){if(customSchedulerFn){customSchedulerFn(flush);}else{scheduleFlush();}}};function setScheduler(scheduleFn){customSchedulerFn=scheduleFn;} function setAsap(asapFn){asap=asapFn;} var browserWindow=typeof window!=='undefined'?window:undefined;var browserGlobal=browserWindow||{};var BrowserMutationObserver=browserGlobal.MutationObserver||browserGlobal.WebKitMutationObserver;var isNode=false;var isWorker=typeof Uint8ClampedArray!=='undefined'&&typeof importScripts!=='undefined'&&typeof MessageChannel!=='undefined';function useNextTick(){return function(){return process.nextTick(flush);};} function useVertxTimer(){if(typeof vertxNext!=='undefined'){return function(){vertxNext(flush);};} return useSetTimeout();} function useMutationObserver(){var iterations=0;var observer=new BrowserMutationObserver(flush);var node=document.createTextNode('');observer.observe(node,{characterData:true});return function(){node.data=iterations=++iterations%2;};} function useMessageChannel(){var channel=new MessageChannel();channel.port1.onmessage=flush;return function(){return channel.port2.postMessage(0);};} function useSetTimeout(){var globalSetTimeout=setTimeout;return function(){return globalSetTimeout(flush,1);};} var queue=new Array(1000);function flush(){for(var i=0;i=0&&deps.indexOf(dep.from)<0){deps.push(dep.from);changed=true;}});}while(changed&&transitive);return deps;},getDependents:function(name){return jobDeps.filter(function(dep){return dep.from===name;}).map(function(dep){return dep.to;});},getWaitedJobs:function(){return jobs.map(function(job){return job.name;}).filter(function(item,index,self){return self.indexOf(item)===index;});},getMissingJobs:function(){var self=this;var waited=this.getWaitedJobs();var missing=[];waited.forEach(function(job){self.getDependencies(job).forEach(function(job){if(!(job in self.services)){missing.push(job);}});});return missing.filter(function(item,index,self){return self.indexOf(item)===index;}).filter(function(item){return waited.indexOf(item)<0;}).filter(function(job){return!job.error;});},getFailedJobs:function(){return jobs.filter(function(job){return!!job.error;});},factories:factories,services:services,};odoo.define=function(){var args=Array.prototype.slice.call(arguments);var name=typeof args[0]==="string"?args.shift():"__odoo_job"+jobUID++;var factory=args[args.length-1];var deps;if(args[0]instanceof Array){deps=args[0];}else{deps=[];factory.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,function(match,dep){deps.push(dep);});} if(!(deps instanceof Array)){throw new Error("Dependencies should be defined by an array",deps);} if(typeof factory!=="function"){throw new Error("Factory should be defined by a function",factory);} if(typeof name!=="string"){throw new Error("Invalid name definition (should be a string",name);} if(name in factories){throw new Error("Service "+name+" already defined");} factory.deps=deps;factories[name]=factory;jobs.push({name:name,factory:factory,deps:deps,});deps.forEach(function(dep){jobDeps.push({from:dep,to:name});});this.processJobs(jobs,services);};odoo.log=function(){var missing=[];var failed=[];var cycle=null;if(jobs.length){var debugJobs={};var rejected=[];var rejectedLinked=[];var job;var jobdep;for(var k=0;kmod.name),unloaded:unloaded?unloaded.map((mod)=>mod.name):[],cycle,};didLogInfoResolve();};odoo.processJobs=function(jobs,services){var job;function processJob(job){var require=makeRequire(job);var jobExec;function onError(e){job.error=e;console.error(`Error while loading ${job.name}: ${e.message}`,e);} var def=new Promise(function(resolve){try{jobExec=job.factory.call(null,require);jobs.splice(jobs.indexOf(job),1);}catch(e){onError(e);} if(!job.error){Promise.resolve(jobExec).then(function(data){services[job.name]=data;resolve();odoo.processJobs(jobs,services);}).guardedCatch(function(e){job.rejected=e||true;jobs.push(job);}).catch(function(e){if(e instanceof Error){onError(e);} resolve();});}else{resolve();}});jobPromises.push(def);} function isReady(job){return(!job.error&&!job.rejected&&job.factory.deps.every(function(name){return name in services;}));} function makeRequire(job){var deps={};Object.keys(services).filter(function(item){return job.deps.indexOf(item)>=0;}).forEach(function(key){deps[key]=services[key];});return function require(name){if(!(name in deps)){console.error("Undefined dependency: ",name);} return deps[name];};} while(jobs.length){job=undefined;for(var i=0;i`"${j}"`).join(" => ");} const deps=dependencyGraph.get(job);return deps?visitJobs(deps,new Set(visited).add(job)):null;} return visitJobs(jobs.map((j)=>j.name));}})();; /* /web/static/src/session.js defined in bundle 'web.assets_common_minimal' */ odoo.define('@web/session',async function(require){'use strict';let __exports={};const session=__exports.session=odoo.__session_info__||{};delete odoo.__session_info__;return __exports;});; /* /web/static/src/legacy/js/core/cookie_utils.js defined in bundle 'web.assets_common_minimal' */ odoo.define('web.utils.cookies',function(require){"use strict";return{get_cookie(cookieName){var cookies=document.cookie?document.cookie.split('; '):[];for(var i=0,l=cookies.length;i{if(document.fonts){document.fonts.ready.then(resolve);}else{setTimeout(resolve,150);}});afterFontsloading.then(_adapt);if(options.images.length){await _afterImagesLoading(options.images);_adapt();} const debouncedAdapt=()=>{clearTimeout(debounce);debounce=setTimeout(_adapt,250);};window.addEventListener('resize',debouncedAdapt);el.addEventListener('dom:autoMoreMenu:adapt',_adapt);el.addEventListener('dom:autoMoreMenu:destroy',destroy,{once:true});function _restore(){if(!extraItemsToggle){return;} [...extraItemsToggle.querySelector('.dropdown-menu').children].forEach((item)=>{if(!isUserNavbar){item.classList.add('nav-item');const itemLink=item.querySelector('.dropdown-item');itemLink.classList.remove('dropdown-item');itemLink.classList.add('nav-link');}else{item.classList.remove('dropdown-item');const dropdownSubMenu=item.querySelector('.dropdown-menu');const dropdownSubMenuButton=item.querySelector('.dropdown-toggle');if(dropdownSubMenu){dropdownSubMenu.classList.remove(...dropdownSubMenuClasses);} if(dropdownSubMenuButton){dropdownSubMenuButton.classList.remove(...dropdownToggleClasses);}} el.insertBefore(item,extraItemsToggle);});extraItemsToggle.remove();extraItemsToggle=null;} function _adapt(){if(options.loadingStyleClasses.length){el.classList.add(...options.loadingStyleClasses);} _restore();if(!el.getClientRects().length||el.closest('.show')||window.matchMedia(`(max-width: ${options.minSize}px)`).matches){return _endAutoMoreMenu();} let unfoldableItems=[];const items=[...el.children].filter((node)=>{if(node.matches&&!node.matches(options.unfoldable)){return true;} unfoldableItems.push(node);return false;});var nbItems=items.length;var menuItemsWidth=items.reduce((sum,el)=>sum+computeFloatOuterWidthWithMargins(el,true,true,false),0);let maxWidth=0;if(options.maxWidth){maxWidth=options.maxWidth();} if(!maxWidth){maxWidth=computeFloatOuterWidthWithMargins(el,true,true,true);var style=window.getComputedStyle(el);maxWidth-=(parseFloat(style.paddingLeft)+parseFloat(style.paddingRight)+parseFloat(style.borderLeftWidth)+parseFloat(style.borderRightWidth));maxWidth-=unfoldableItems.reduce((sum,el)=>sum+computeFloatOuterWidthWithMargins(el,true,true,false),0);} if(maxWidth-menuItemsWidth>=-0.001){return _endAutoMoreMenu();} const dropdownMenu=_addExtraItemsButton(items[nbItems-1].nextElementSibling);menuItemsWidth+=computeFloatOuterWidthWithMargins(extraItemsToggle,true,true,false);do{menuItemsWidth-=computeFloatOuterWidthWithMargins(items[--nbItems],true,true,false);}while(!(maxWidth-menuItemsWidth>=-0.001)&&(nbItems>0));const extraItems=items.slice(nbItems);extraItems.forEach((el)=>{if(!isUserNavbar){const navLink=el.querySelector('.nav-link, a');el.classList.remove('nav-item');navLink.classList.remove('nav-link');navLink.classList.add('dropdown-item');navLink.classList.toggle('active',el.classList.contains('active'));}else{const dropdownSubMenu=el.querySelector('.dropdown-menu');const dropdownSubMenuButton=el.querySelector('.dropdown-toggle');el.classList.add('dropdown-item','p-0');if(dropdownSubMenu){dropdownSubMenu.classList.add(...dropdownSubMenuClasses);} if(dropdownSubMenuButton){dropdownSubMenuButton.classList.add(...dropdownToggleClasses);}} dropdownMenu.appendChild(el);});_endAutoMoreMenu();} function computeFloatOuterWidthWithMargins(el,mLeft,mRight,considerAutoMargins){var rect=el.getBoundingClientRect();var style=window.getComputedStyle(el);var outerWidth=rect.right-rect.left;if(mLeft!==false&&(considerAutoMargins||!autoMarginLeftRegex.test(el.getAttribute('class')))){outerWidth+=parseFloat(style.marginLeft);} if(mRight!==false&&(considerAutoMargins||!autoMarginRightRegex.test(el.getAttribute('class')))){outerWidth+=parseFloat(style.marginRight);} return isNaN(outerWidth)?0:outerWidth;} function _addExtraItemsButton(target){let dropdownMenu=document.createElement('div');extraItemsToggle=dropdownMenu.cloneNode();const extraItemsToggleIcon=document.createElement('i');const extraItemsToggleLink=document.createElement('a');dropdownMenu.className='dropdown-menu';extraItemsToggle.className='nav-item dropdown o_extra_menu_items';extraItemsToggleIcon.className='fa fa-plus';Object.entries({role:'button',href:'#',class:'nav-link dropdown-toggle o-no-caret','data-toggle':'dropdown','aria-expanded':false,}).forEach(([key,value])=>{extraItemsToggleLink.setAttribute(key,value);});extraItemsToggleLink.appendChild(extraItemsToggleIcon);extraItemsToggle.appendChild(extraItemsToggleLink);extraItemsToggle.appendChild(dropdownMenu);el.insertBefore(extraItemsToggle,target);return dropdownMenu;} function destroy(){_restore();window.removeEventListener('resize',debouncedAdapt);el.removeEventListener('dom:autoMoreMenu:adapt',_adapt);} function _afterImagesLoading(images){const defs=images.map((image)=>{if(image.complete||!image.getClientRects().length){return null;} return new Promise(function(resolve,reject){if(!image.width){image.classList.add('o_menu_image_placeholder');} image.addEventListener('load',()=>{image.classList.remove('o_menu_image_placeholder');resolve();});});});return Promise.all(defs);} function _endAutoMoreMenu(){el.classList.remove(...options.loadingStyleClasses);}} __exports.destroyAutoMoreMenu=destroyAutoMoreMenu;function destroyAutoMoreMenu(el){el.dispatchEvent(new Event('dom:autoMoreMenu:destroy'));} return __exports;});